import request from '@/utils/request'

// 查询楼栋列表
export function listLoudong(query) {
  return request({
    url: '/basedata/loudong/list',
    method: 'get',
    params: query
  })
}

// 查询楼栋详细
export function getLoudong(ID) {
  return request({
    url: '/basedata/loudong/' + ID,
    method: 'get'
  })
}

// 新增楼栋
export function addLoudong(data) {
  return request({
    url: '/basedata/loudong',
    method: 'post',
    data: data
  })
}

// 修改楼栋
export function updateLoudong(data) {
  return request({
    url: '/basedata/loudong',
    method: 'put',
    data: data
  })
}

// 删除楼栋
export function delLoudong(ID) {
  return request({
    url: '/basedata/loudong/' + ID,
    method: 'delete'
  })
}
// 通过区域code获得楼栋
export function getfloor(areaCode){
  return request({
    url: 'basedata/loudong/getByAreaCode' + areaCode,
    method: 'get'
  })
}
